Package org.dogtagpki.util.cert
Class CRMFUtil
java.lang.Object
org.dogtagpki.util.cert.CRMFUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.mozilla.jss.pkix.crmf.CertRequest
createCertRequest
(org.mozilla.jss.crypto.CryptoToken token, KeyPair keyPair, org.mozilla.jss.pkix.primitive.Name subject, org.mozilla.jss.crypto.X509Certificate transportCert, org.mozilla.jss.crypto.KeyWrapAlgorithm keyWrapAlgorithm, boolean useOAEP, org.mozilla.jss.netscape.security.x509.Extensions extensions) static org.mozilla.jss.pkix.crmf.CertTemplate
createCertTemplate
(org.mozilla.jss.pkix.primitive.Name subject, PublicKey publicKey) static org.mozilla.jss.asn1.SEQUENCE
createCRMFRequest
(org.mozilla.jss.pkix.crmf.CertRequest certRequest, org.mozilla.jss.pkix.crmf.ProofOfPossession pop) static org.mozilla.jss.pkix.crmf.ProofOfPossession
createPop
(org.mozilla.jss.crypto.SignatureAlgorithm signatureAlgorithm, byte[] signature) static String
encodeCRMF
(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) static org.mozilla.jss.netscape.security.x509.Extension
getExtensionFromCertTemplate
(org.mozilla.jss.pkix.crmf.CertTemplate certTemplate, org.mozilla.jss.netscape.security.util.ObjectIdentifier csOID) Get extension from CRMF request (CertTemplate)static org.mozilla.jss.netscape.security.x509.SubjectAlternativeNameExtension
getSANExtension
(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) static org.mozilla.jss.netscape.security.x509.X500Name
getSubjectName
(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) static org.mozilla.jss.netscape.security.x509.X509Key
getX509KeyFromCRMFMsg
(org.mozilla.jss.pkix.crmf.CertReqMsg crmfMsg) static org.mozilla.jss.netscape.security.x509.X509Key
getX509KeyFromCRMFMsgs
(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) static org.mozilla.jss.pkix.crmf.CertReqMsg[]
static org.mozilla.jss.asn1.SEQUENCE
parseCRMFMsgs
(byte[] request)
-
Field Details
-
logger
public static final org.slf4j.Logger logger
-
-
Constructor Details
-
CRMFUtil
public CRMFUtil()
-
-
Method Details
-
parseCRMFMsgs
public static org.mozilla.jss.asn1.SEQUENCE parseCRMFMsgs(byte[] request) throws IOException, org.mozilla.jss.asn1.InvalidBERException - Throws:
IOException
org.mozilla.jss.asn1.InvalidBERException
-
parseCRMF
- Throws:
Exception
-
encodeCRMF
- Throws:
Exception
-
getX509KeyFromCRMFMsg
public static org.mozilla.jss.netscape.security.x509.X509Key getX509KeyFromCRMFMsg(org.mozilla.jss.pkix.crmf.CertReqMsg crmfMsg) throws NoSuchAlgorithmException, InvalidKeyException, org.mozilla.jss.crypto.InvalidKeyFormatException - Throws:
NoSuchAlgorithmException
InvalidKeyException
org.mozilla.jss.crypto.InvalidKeyFormatException
-
getX509KeyFromCRMFMsgs
public static org.mozilla.jss.netscape.security.x509.X509Key getX509KeyFromCRMFMsgs(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) throws IOException, NoSuchAlgorithmException, InvalidKeyException, org.mozilla.jss.crypto.InvalidKeyFormatException - Throws:
IOException
NoSuchAlgorithmException
InvalidKeyException
org.mozilla.jss.crypto.InvalidKeyFormatException
-
getSubjectName
public static org.mozilla.jss.netscape.security.x509.X500Name getSubjectName(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) throws IOException - Throws:
IOException
-
getExtensionFromCertTemplate
public static org.mozilla.jss.netscape.security.x509.Extension getExtensionFromCertTemplate(org.mozilla.jss.pkix.crmf.CertTemplate certTemplate, org.mozilla.jss.netscape.security.util.ObjectIdentifier csOID) throws IOException Get extension from CRMF request (CertTemplate)- Throws:
IOException
-
getSANExtension
public static org.mozilla.jss.netscape.security.x509.SubjectAlternativeNameExtension getSANExtension(org.mozilla.jss.asn1.SEQUENCE crmfMsgs) throws IOException - Throws:
IOException
-
createCertTemplate
public static org.mozilla.jss.pkix.crmf.CertTemplate createCertTemplate(org.mozilla.jss.pkix.primitive.Name subject, PublicKey publicKey) throws Exception - Throws:
Exception
-
createCertRequest
public static org.mozilla.jss.pkix.crmf.CertRequest createCertRequest(org.mozilla.jss.crypto.CryptoToken token, KeyPair keyPair, org.mozilla.jss.pkix.primitive.Name subject, org.mozilla.jss.crypto.X509Certificate transportCert, org.mozilla.jss.crypto.KeyWrapAlgorithm keyWrapAlgorithm, boolean useOAEP, org.mozilla.jss.netscape.security.x509.Extensions extensions) throws Exception - Throws:
Exception
-
createPop
public static org.mozilla.jss.pkix.crmf.ProofOfPossession createPop(org.mozilla.jss.crypto.SignatureAlgorithm signatureAlgorithm, byte[] signature) throws Exception - Throws:
Exception
-
createCRMFRequest
public static org.mozilla.jss.asn1.SEQUENCE createCRMFRequest(org.mozilla.jss.pkix.crmf.CertRequest certRequest, org.mozilla.jss.pkix.crmf.ProofOfPossession pop) throws Exception - Throws:
Exception
-